package com.chenshuang.bean;

import java.util.Objects;

public class Admin{
    private Integer id;
    private String username;
    private String password;
    private String sex;

    public Admin() {
    }

    public Admin(Integer id, String username, String password, String sex) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.sex = sex;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Admin admin = (Admin) o;
        return Objects.equals(id, admin.id) && Objects.equals(username, admin.username) && Objects.equals(password, admin.password) && Objects.equals(sex, admin.sex);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, password, sex);
    }

    @Override
    public String toString() {
        return "【" +
                "管理id：" + id +
                "用户名称：" + username +
                "用户密码：" + password +
                "性别：" + sex +
                '】';
    }
}
